package com.aiit.service.impl;

import com.aiit.dao.ISaleOrderDao;
import com.aiit.pojo.NameValue;
import com.aiit.pojo.order.SaleOrder;
import com.aiit.service.ISaleOrderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SaleOrderServiceImpl extends ServiceImpl<ISaleOrderDao, SaleOrder> implements ISaleOrderService {
    @Autowired
    ISaleOrderDao saleOrderDao;
    @Override
    public Integer insert(SaleOrder saleOrder) {
        return saleOrderDao.insert(saleOrder);
    }

    @Override
    public List<SaleOrder> querySaleId() {
        return saleOrderDao.querySaleId();
    }

    @Override
    public SaleOrder queryById(int id) {
        return saleOrderDao.selectById2(id);
    }

    @Override
    public List<SaleOrder> queryByLCId(Integer lingjianId, Integer customerId) {
        return saleOrderDao.queryByLCId(lingjianId,customerId);
    }
    @Override
    public List<SaleOrder> queryByLUId(Integer lingjianId, Integer userId) {
        return saleOrderDao.queryByLUId(lingjianId,userId);
    }

    @Override
    public List<SaleOrder> queryByLId(Integer lingjianId) {
        return saleOrderDao.queryByLId(lingjianId);
    }
    @Override
    public List<SaleOrder> queryByLId2(Integer lingjianId) {
        return saleOrderDao.queryByLId2(lingjianId);
    }

    @Override
    public List<SaleOrder> queryByCId(Integer customerId) {
        return saleOrderDao.queryByCId(customerId);
    }
    @Override
    public List<SaleOrder> queryByUId(Integer userId) {
        return saleOrderDao.queryByUId(userId);
    }

    @Override
    public List<SaleOrder> queryAll() {
        return saleOrderDao.selectList(null);
    }
    @Override
    public List<SaleOrder> queryAll1() {
        return saleOrderDao.queryAll1();
    }

    @Override
    public Integer deleteById(Integer id) {
        return saleOrderDao.deleteById(id);
    }

    @Override
    public List<NameValue> queryAllSum() {
        return saleOrderDao.queryAllSum();
    }

}
